import "recommend.dart";

// 详情页请求序列化结果
// class DetailSerializedGen {
//   int code;
//   Detail detailData;
//   String msg;

//   DetailSerializedGen({this.code, this.detailData, this.msg});

//   DetailSerializedGen.fromJson(Map<String, dynamic> json) {
//     code = json['code'];
//     detailData = json['data'] != null ? new Detail.fromJson(json['data']) : null;
//     msg = json['msg'];
//   }

//   Map<String, dynamic> toJson() {
//     final Map<String, dynamic> data = new Map<String, dynamic>();
//     data['code'] = this.code;
//     if (this.detailData != null) {
//       data['detailData'] = this.detailData.toJson();
//     }
//     data['msg'] = this.msg;
//     return data;
//   }
// }

class DetailSerializedGen {
  bool isFavorite;
  bool isLike;
  VideoInfo videoInfo;
  List<VideoInfo> videoList;

  DetailSerializedGen({this.isFavorite, this.isLike, this.videoInfo, this.videoList});

  DetailSerializedGen.fromJson(Map<String, dynamic> json) {
    isFavorite = json['isFavorite'];
    isLike = json['isLike'];
    videoInfo = json['videoInfo'] != null
        ? new VideoInfo.fromJson(json['videoInfo'])
        : null;
    if (json['videoList'] != null) {
      videoList = <VideoInfo>[];
      json['videoList'].forEach((v) {
        videoList.add(new VideoInfo.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['isFavorite'] = this.isFavorite;
    data['isLike'] = this.isLike;
    if (this.videoInfo != null) {
      data['videoInfo'] = this.videoInfo.toJson();
    }
    if (this.videoList != null) {
      data['videoList'] = this.videoList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
